home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / rocketcar2.swf / scripts / frame_24 / PlaceObject2_869_102 / CLIPACTIONRECORD onClipEvent(load).as < prev   
Encoding:
Text File  |  2008-09-24  |  1010 b   |  52 lines

  1. onClipEvent(load){
  2.    function changeDir()
  3.    {
  4.       dir = random(2);
  5.       if(dir == 0)
  6.       {
  7.          dir = "left";
  8.       }
  9.       if(dir == 1)
  10.       {
  11.          dir = "right";
  12.       }
  13.    }
  14.    function bomb()
  15.    {
  16.       if(_root.paused)
  17.       {
  18.          return undefined;
  19.       }
  20.       if(health <= 0)
  21.       {
  22.          return undefined;
  23.       }
  24.       type = "bomb2";
  25.       var _loc2_ = type + i;
  26.       i++;
  27.       _root.attachMovie(type,_loc2_,i);
  28.       _root[_loc2_]._x = _X;
  29.       _root[_loc2_]._y = _Y + 50;
  30.    }
  31.    if(_root.sound)
  32.    {
  33.       ufoS = new Sound(this);
  34.       ufoS.attachSound("ufo");
  35.       ufoS.setVolume(70);
  36.       ufoS.start(0,9999);
  37.       explode1 = new Sound(this);
  38.       explode1.attachSound("explode2");
  39.       explode = new Sound(this);
  40.       explode.attachSound("explode1");
  41.    }
  42.    damage = false;
  43.    health = 100;
  44.    speed = 2;
  45.    delay = 5000;
  46.    resetTime = getTimer() + delay;
  47.    time = 0;
  48.    t = 0;
  49.    changeDir();
  50.    i = 1;
  51. }
  52.